package com.dhwl.hsh.lib.api;

import com.dhwl.hsh.lib.bean.HttpResponse;
import com.dhwl.hsh.lib.bean.resp.AreaResp;
import com.dhwl.hsh.lib.bean.resp.BannerResponse;
import com.dhwl.hsh.lib.bean.resp.CarTypeResp;
import com.dhwl.hsh.lib.bean.resp.HtmlUrlResp;

import java.util.List;

import retrofit2.http.GET;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by hjd on 2016/5/23.
 */
public interface CommonApi {

    /**
     * 获取短信验证码
     *
     * @param phone
     * @param type
     * @return
     */
    @GET("apiServices/sms")
    Observable<HttpResponse<String>> getSMS(@Query("phone") String phone, @Query("type") int type);

    /**
     * 商户端首页banner广告
     * @return
     */
    @GET("systemAction/merchantBanner")
    Observable<HttpResponse<List<BannerResponse>>> getBanner();

    /**
     * 获取地址信息
     * @return
     */
    @GET("systemAction/area")
    Observable<HttpResponse<List<AreaResp>>> getArea();

    /**
     * 获取车型
     * @return
     */
    @GET("systemAction/carType")
    Observable<HttpResponse<List<CarTypeResp>>> getCarType();

    /**
     * 获取html页面URL
     * @return
     */
    @GET("systemAction/htmlPage")
    Observable<HttpResponse<HtmlUrlResp>> getHtmlUrl();
}
